<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>è´­ä¹°ä¿¡æ¯</title>
  <style>
    .buy-info {
      padding: 34px;
    }

    .buy-info .buy-info-title {
      padding-top: 10px;
      padding-bottom: 10px;
    }
  </style>
  <base href="/">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../../system/index/top.jsp"%>
<!-- 日期框 -->
<link rel="stylesheet" href="static/ace/css/datepicker.css" />
</head>

<body>
  <div class="buy-info">
    <div class="buy-info-title">用户：${user.petName }</div>
    <div class="buy-info-title">手机号：${user.phone }</div>
    <c:if test="${pd.state == '1' }">
    	<div class="buy-info-title">已消费好友：${num }人</div>
    </c:if>
    <c:if test="${pd.state == '2' }">
    	<div class="buy-info-title">未消费好友：${num }人</div>
    </c:if>
    <div>
      <table id="simple-table"
		class="table table-striped table-bordered table-hover"
		style="margin-top: 5px;">
		<thead>
			<tr>
				<th class="center">昵称</th>
				<th class="center">手机号</th>
				<th class="center">邀请注册时间</th>
				<c:if test="${pd.state == '1' }">
					<th class="center">消费商品 (件)</th>
					<th class="center">消费金额 (元)</th>
				</c:if>
			</tr>
		</thead>
		<tbody>

			<!-- 开始循环 -->
			<c:choose>
				<c:when test="${not empty inviteNum}">
					<c:if test="${QX.cha == 1 }">
						<c:forEach items="${inviteNum}" var="user" varStatus="vs">
							<tr>
								<td class="center">${user.pet_name }</td>
								<td class="center">${user.phone}</td>
								<td class="center">${user.creation_date }</td>
								<c:if test="${pd.state == '1' }">
									<td class="center">${user.number }</td>
									<td class="center">${user.price }</td>
								</c:if>
							</tr>
						</c:forEach>
					</c:if>
					<c:if test="${QX.cha == 0 }">
						<tr>
							<td colspan="100" class="center">您无权查看</td>
						</tr>
					</c:if>
				</c:when>
				<c:otherwise>
					<tr class="main_info">
						<td colspan="100" class="center">没有相关数据</td>
					</tr>
				</c:otherwise>
			</c:choose>
		</tbody>
	</table>
    </div>
  </div>
  <script type="text/javascript" src="https://chartjs.bootcss.com/samples/utils.js"></script>
</body>
<script type="text/javascript">

</script>
</html>
